package com.wwlwxg.docker;

import com.github.dockerjava.api.DockerClient;
import com.github.dockerjava.api.model.Info;
import com.github.dockerjava.core.DefaultDockerClientConfig;
import com.github.dockerjava.core.DockerClientBuilder;
import com.github.dockerjava.core.DockerClientConfig;
import org.junit.Test;

public class DockerTest {

	@Test
	public void test1() {
		DockerClientConfig clientConfig = DefaultDockerClientConfig.createDefaultConfigBuilder()
											.withDockerHost("tcp://localhost:2376")
											.withDockerTlsVerify(false)
											.withDockerConfig("/home/user/.docker").build();
		DockerClient client = DockerClientBuilder.getInstance(clientConfig).build();

		Info info = client.infoCmd().exec();
		System.out.println(info);

	}
}
